package com.polaris.live.utils.zego.listener

import im.zego.zegoexpress.constants.ZegoPlayerState
import im.zego.zegoexpress.constants.ZegoRemoteDeviceState
import im.zego.zegoexpress.entity.ZegoPlayStreamQuality
import org.json.JSONObject

/**
 * OnLivePlayHandlerListener
 * @author Created by 天晴 on 2024/1/27 15:26
 * @since 1.0.0
 **/
/**
 * 辅助处理即构回调
 */
abstract class OnLivePlayHandlerListener : OnLivePlayListener {
    /**
     * 第一帧是否展示
     */
    private var mFirstFrame = true
    override fun onPlayStart() {
    }

    override fun onPlayStop() {
        mFirstFrame = false
    }

    override fun onPlayerRenderVideoFirstFrame() {
        mFirstFrame = true

    }

    override fun onPlayerStateUpdate(
        state: ZegoPlayerState?,
        errorCode: Int,
        extendedData: JSONObject?
    ) {
    }

    override fun onRemoteSpeakerStateUpdate(state: ZegoRemoteDeviceState) {
    }

    override fun onPlayerQualityUpdate(quality: ZegoPlayStreamQuality) {
    }

    abstract fun start()
    abstract fun stop()

}